﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ReadyBubbleProtect : MonoBehaviour {

    private Collision2D coll;

    private void Awake()
    {
        this.coll = GameManager.Instance.readyBubble.GetComponent<Collision2D>();
    }

    void Update() {

    }

    private void OnCollisionEnter2D(Collision2D other)
    {
        if (other == coll)
        {
            this.GetComponent<CircleCollider2D>().isTrigger = true;
        }
    }

    //private void OnCollisionExit2D(Collision2D collision)
    //{
    //    if (this.GetComponent<CircleCollider2D>().isTrigger)
    //    {
    //        this.GetComponent<CircleCollider2D>().isTrigger = false;
    //    }
    //}
}
